package com.erp.erp_servers.Customer2;

import com.alibaba.fastjson.JSONObject;
import com.erp.erp_entitys.Customer2.Customer2Entity;
import com.erp.erp_entitys.Customer2.Customer2Example;
import com.erp.erp_entitys.Customer2.req.supAccDeCollReq;
import com.erp.erp_entitys.Customer2.req.supAmountAndPurAmountReq;
import com.erp.erp_entitys.Customer2.res.supAccDeCollRes;
import com.erp.erp_entitys.Customer2.res.supAmountAndPurAmountRes;
import com.erp.vo.SelectVo;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName ICustomerService
 * @Description TODO
 * @Author songjizhen
 * @Date 2020-06-29 20:04
 * @Version 1.0
 */
public interface ICustomer2Service {
    long countByExample(Customer2Example example);

    int deleteByExample(Customer2Example example);
    int deleteByExample2(Customer2Example example,List<String> list);
    int deleteByPrimaryKey(Integer id);

    int insert(Customer2Entity record);

    int insertSelective(Customer2Entity record);

    List<Customer2Entity> selectByExample(Customer2Example example);

    Customer2Entity selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Customer2Entity record, @Param("example") Customer2Example example);

    int updateByExample(@Param("record") Customer2Entity record, @Param("example") Customer2Example example);

    int updateByPrimaryKeySelective(Customer2Entity record);

    int updateByPrimaryKey(Customer2Entity record);

    List<SelectVo> getAllList();

    List<Customer2Entity>  selectByMap(@Param("record") Customer2Entity record);//根据分类、业务员、名称查询
    List<Customer2Entity>  selectByMap2(@Param("record") Customer2Entity record);//根据分类、业务员、名称查询
    Customer2Entity selectByCode(String code);
    /**
     * 根据Id更新流程状态
     * @param id
     * @return
     */
    boolean updateStatus(String id,String spstatus);
    /**
     * 根据供应商流程表更新供应商表审批状态
     */
    int updateStatusByProcessAndCustomer2();


    /**
     * 供应商账期详情--分页
     * @param req
     * @return
     */
    PageInfo<supAccDeCollRes> supAccDeColl(supAccDeCollReq req);

    /**
     * 供应商账期详情--导出
     * @param req
     * @return
     */
    JSONObject supAccDeCollExport(supAccDeCollReq req);


    /**
     * 供应商采购金额及出货金额统计--分页
     * @param req
     * @return
     */
    PageInfo<supAmountAndPurAmountRes> supAmountAndPurAmountPage(supAmountAndPurAmountReq req);

    /**
     * 供应商采购金额及出货金额统计--导出
     * @param req
     * @return
     */
    JSONObject supAmountAndPurAmountExport(supAmountAndPurAmountReq req);


    /**
     * 获取已审批的，供应商类型为‘’合作类型‘’的供应商
     * @return
     */
    List<SelectVo> getFilterCustomer2List();

    /**
     * 获取最大供应商代码
     * @return
     */
    String getMaxPaymentAccountNo();

}
